<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>管理后台</title>
    <!-- 使用 CDN 加载 Bootstrap -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
</head>
<body>
    <!-- 引入管理员全局通知组件 -->
    <div th:replace="~{common/admin-global-notification :: notification}"></div>
    
    <!-- 使用admin专用导航栏 -->
    <div th:replace="~{common/admin-navbar :: navbar}"></div>

<div class="container mt-4">
    <h2 class="mb-4"><i class="bi bi-shield-lock"></i> 系统管理后台</h2>

    <div class="row">
        <div class="col-md-3 mb-3">
            <div class="card bg-primary text-white">
                <div class="card-body">
                    <h5 class="card-title">用户总数</h5>
                    <p class="card-text" th:text="${userCount}">0</p>
                </div>
            </div>
        </div>

        <div class="col-md-9">
            <div class="card">
                <div class="card-body">
                    <h5 class="card-title">快速操作</h5>
                    <div class="btn-group">
                        <a th:href="@{/admin/users}" class="btn btn-outline-primary">
                            <i class="bi bi-people"></i> 用户管理
                        </a>
                        <a th:href="@{/admin/categories}" class="btn btn-outline-info">
                            <i class="bi bi-tags"></i> 分类管理
                        </a>
                        <a th:href="@{/admin/products}" class="btn btn-outline-success">
                            <i class="bi bi-box-seam"></i> 商品管理
                        </a>
                        <a th:href="@{/admin/orders}" class="btn btn-outline-warning">
                            <i class="bi bi-cart-check"></i> 订单管理
                        </a>
                        <button class="btn btn-outline-secondary">
                            <i class="bi bi-cloud-upload"></i> 数据导入
                        </button>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<!-- 加载 Bootstrap JS -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>